lengthChance("TBId",8)
lengthChance("belong-part",30)
function dataChange(){
    $(".mainLeft ul").on("click","a",function(e) { 
        $(this).css("color","#2D5EA1").parent().siblings().children().css("color","black")
     })
}
dataChange()
function keepDataCeter(){
   
    $(".data-center").click()
    $(".data-center").css("transition","all")
}
keepDataCeter()

function allChoose(){
    $("#adCtl").on("click",function(){
        if($("#adCtl:checked")[0]){
            $("#tableRight tbody input").prop("checked",true)
        }else{
            $("#tableRight tbody input").removeAttr("checked")
        }
    })

    $("#tableRight tbody").on("click","input",function(){
        let flag = 0
        $("#tableRight tbody input").each(function(index,el){

            if($(el).prop("checked")==false){
                $("#adCtl").prop("checked",false)
                flag =1
            }

        })
        if(flag==0){
            $("#adCtl").prop("checked",true)
        }
    })
  
}
allChoose()
adTaskNum()
 function adTaskNum(){
    $("#adTastNum").on("click","button",function(){
         $(this).text("已选中").parent().addClass("active").siblings().removeClass("active").children("button").text("未选中")
    })
 }